Skip to content

Conversation

davner
Copy link
Member

@davner davner commented Oct 21, 2025

  • Implement WorkflowStateSerializer for handling workflow state data.
  • Refactor GPPTooViewSet to include _format_workflow_state_properties method.
  • Update clone observation and target serializers to inherit from _BaseSerializer.
  • Modify frontend field identifiers with new workflow state handling.
  • Add disabled option for workflow state field in frontend.
  • Add tests for workflow state serialization and validation.

Checklist

  • Added a release note in doc/changes using the PR number.

- Implement WorkflowStateSerializer for handling workflow state data.
- Refactor GPPTooViewSet to include _format_workflow_state_properties method.
- Update clone observation and target serializers to inherit from _BaseSerializer.
- Modify frontend field identifiers with new workflow state handling.
- Add disabled option for workflow state field in frontend.
- Add tests for workflow state serialization and validation.
@davner davner self-assigned this Oct 21, 2025
@davner davner requested a review from Copilot October 21, 2025 17:35
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements workflow state handling for both backend and frontend, enabling users to view and select observation workflow states in the GPP observation form. The changes refactor serializers to use a shared base class for form data normalization and add comprehensive test coverage.

  • Implements WorkflowStateSerializer for validating and converting workflow state selections
  • Refactors serializers to inherit from _BaseSerializer for consistent form data handling
  • Adds workflow state selection UI with disabled options for non-editable states

Reviewed Changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/goats_tom/serializers/gpp/workflow_state.py New serializer for workflow state validation and enum conversion
src/goats_tom/serializers/gpp/_base.py Base serializer class extracting common form data normalization logic
src/goats_tom/serializers/gpp/clone_observation.py Refactored to inherit from _BaseSerializer
src/goats_tom/serializers/gpp/clone_target.py Refactored to inherit from _BaseSerializer
src/goats_tom/serializers/gpp/init.py Updated exports to include WorkflowStateSerializer
src/goats_tom/api_views/gpp/toos.py Moved _format_workflow_state_properties implementation to proper location
src/goats_tom/static/js/gpp/fields.js Added workflow state field definition with option states
src/goats_tom/static/js/gpp/observation_form.js Added support for disabled select options and removed debug logging
tests/goats_tom/serializers/gpp/test_workflow_state.py Comprehensive tests for workflow state serialization
tests/goats_tom/serializers/gpp/test__base.py Tests for base serializer form data normalization
tests/goats_tom/api_views/gpp/test_toos.py Updated tests for workflow state formatting methods
tests/conftest.py Removed extra blank line

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@codecov
Copy link

codecov bot commented Oct 21, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.91%. Comparing base (945b2f1) to head (076a31e).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #466      +/-   ##
==========================================
+ Coverage   78.70%   78.91%   +0.21%     
==========================================
  Files         260      264       +4     
  Lines        8307     8390      +83     
  Branches      489      490       +1     
==========================================
+ Hits         6538     6621      +83     
  Misses       1680     1680              
  Partials       89       89              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@davner davner merged commit c919750 into main Oct 21, 2025
7 checks passed
@davner davner deleted the GOATS-984_GOATS-986/workflow-state-backend-ui branch October 21, 2025 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant